

/**
 * Record pre-insert trigger.
 * Validate the record to be inserted.
 * When false is returned the record will not be inserted in the database.
 * When an exception is thrown the record will also not be inserted in the database but it will be added to databaseManager.getFailedRecords(),
 * the thrown exception can be retrieved via record.exception.getValue().
 *
 * @param {JSRecord<db:/pigeon_board/adm_t900_usuarios>} record record that will be inserted
 *
 * @returns {Boolean}
 *
 * @private
 *
 * @properties={typeid:24,uuid:"5E351A4D-5460-406D-9C34-A29DB8353558"}
 */
function onRecordInsert(record) {
	
	var not_valid = false;
	if (record.s_descripcion == null || record.s_md5_pwd == null){
		not_valid = true;
	}
	
	if (not_valid){
		throw 'Los campos descripción y contraseñas no pueden estar vacíos'
	}

	return true
}
